export default{
    setStorage:(key,value)=>{
        if(typeof value=="string"){
            localStorage.setItem(key,value)
        }else if(typeof value==="object"){
            localStorage.setItem(key,JSON.stringify(value))
        }
    },
    getStorage:(key)=>{
        let value=localStorage.getItem(key)
        try {
            return JSON.parse(value)
        } catch (error) {
            return value
        }
    },
    removeStorage:(key)=>{
        localStorage.removeItem(key)
    }
}